/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ages.test.swat

import com.ages.env.AbstractWorld
import com.ages.graphics.SpriteBufferManager
import javax.media.opengl.GL
import com.ages.graphics.HudText

class GameOverWorld extends AbstractWorld{

  var successor:AbstractWorld=_
  var stop = false
  val start = System.currentTimeMillis

  def think{

  }
  def draw(gl:GL){
    HudText.draw(gl,"GAME OVER",300,300)
//    Thread.sleep(5000)
    SpriteBufferManager.bufferNext(gl)
    if((System.currentTimeMillis-start)>10000)
      {
        worldDone
      }
  }
  def worldDone()= {
    for(wl <- worldListeners)
      {
        wl.worldFinished(SWAT.newGame)
        
      }
  }
}


